<!--BLOCK TITLE-->
<h3 class="block-title"><?php echo $title ?></h3>
        <!--PRODUCTS BLOCK-->
<div class="products list_carousel responsive">
    <ul id="<?php echo $idProduct; ?>">
        <?php foreach ($items as $item) {?>
            <li>
            <div class="product fl">
                    <?php
                        if($item['is_new']==1) echo"<div class='product-new'>
                    </div>";
                        if($item['is_sale']==1) echo"<div class='product-sale'>
                    </div>";
                    ?>
                    
                    <div class="product-preview">
                            <img src="<?php echo Yii::app()->request->baseUrl . $item['avatar'] ?>" 
                                 alt="<?php echo Yii::app()->request->baseUrl . $item['name'] ?>"
                                 title="<?php echo Yii::app()->request->baseUrl . $item['name'] ?>">
                    </div>
                    <div class="product-info">
                            <h5><a href="<?php echo Yii::app()->createUrl('/product/detail', array('id' => $item['id'])) ?>" title="<?php CHtml::encode($item['name']);?>">
                                    <?php echo CHtml::encode(StringHelper::helper()->cutText($item['name'], 56));?>
                                </a>
                            </h5>
                            <h4><?php echo number_format($item['price'],0,",","."); ?> đ</h4>
                            <div class="button-box">
                                    <div>
                                            <i class="icon-shopping-cart"></i>
                                            <span>Thêm sản phẩm</span>
                                    </div>
                            </div>
                    </div>
            </div>
            </li>
            <?php
            }
        ?>
    </ul>
    <div class="clearfix">
    </div>
    
    <div class="carousel_nav">
        <a id="prev_<?php echo $idProduct ?>" class="prev" href="#">&lt;</a>
            <a id="next_<?php echo $idProduct ?>" class="next" href="#">&gt;</a>
    </div>
    
</div>
<script type="text/javascript">
//<![CDATA[
	jQuery(document).ready(function($){
		
		// Activate Sign Up Modal Block on Page Load
		$("#sign-up-modal").modal();
		
		
		// Daily Deal CountDown Clock Settings
		var date = new Date().getTime();			// This example is just to show how this function works.
		var new_date = new Date(date + 86400000);	// You can set your own time whenever you want.
		var n = new_date.toUTCString();				// 'date' value is given in milliseconds.
		
		$("#time").countdown({
			date: new_date,
			yearsAndMonths: true,
			leadingZero: true
		});
		
		
		// CarouFredSel Functions
		$('#carouFredSel-big').carouFredSel({
			responsive:true,
			height: 'auto',
			prev: '#prev_big',
			next: '#next_big',
			auto: {
					timeoutDuration: 10000,
					pauseOnHover: true
				  }
		}).find("li").hover(
			function() { $(this).find("div").slideDown(); },
			function() { $(this).find("div").slideUp();}
		);	
		$('#productBestSale').carouFredSel({
			responsive:true,
			width: '100%',
			scroll: {duration:500,items:1},
			prev: '#prev_productBestSale',
			next: '#next_productBestSale',
			auto: false,
			items: {
				height: 'auto',
			//	height: '30%',	//	optionally resize item-height
				visible: {
					min: 1,
					max: 6
				}
			}
		});
		$('#productNew').carouFredSel({
			responsive:true,
			width: '100%',
			scroll: {duration:500,items:1},
			prev: '#prev_productNew',
			next: '#next_productNew',
			auto: false,
			items: {
				height: 'auto',
			//	height: '30%',	//	optionally resize item-height
				visible: {
					min: 1,
					max: 6
				}
			}
		});
		$('#productFeatured').carouFredSel({
			responsive:true,
			width: '100%',
			scroll: {duration:500,items:1},
			prev: '#prev_productFeatured',
			next: '#next_productFeatured',
			auto: false,
			items: {
				height: 'auto',
			//	height: '30%',	//	optionally resize item-height
				visible: {
					min: 1,
					max: 6
				}
			}
		});
		$('#partner').carouFredSel({
			responsive: true,
			width: '100%',
			scroll: 1,
			items: {
				height:'100%',
			//	height: '30%',	//	optionally resize item-height
				visible: {
					min: 1,
					max: 6
				}
			}
		});
	});
//]]>
</script>